#include "Core\NervusSharedHeader.h"
#include "Render\CMesh.h"

namespace Nervus {
	namespace Render {

		class D3D11Mesh : public Mesh {
			friend class D3D11RenderSystem;

		private:
			D3D11RenderSystem* mRenderSystem;

			ID3D11Buffer* mVertexBuffer;
			ID3D11Buffer* mIndexBuffer;

			ID3D11ShaderResourceView* mTextureView;
			ID3D11SamplerState* mTexSamplerState;
			ID3D11Texture2D* mTexture;

			D3D11Mesh(D3D11RenderSystem* renderSystem, vector<MeshVertex>, DWORD* ind);
			~D3D11Mesh();

			bool loadMesh();
		public:
			void renderMesh();
		};
	}
}